package com.teamsea.bean.factory;

import com.teamsea.bean.Bean1;

public class Bean1StaticFactory {

    private static Bean1 beanWithoutParam = new Bean1();

    private static Bean1 beanSetParam = new Bean1();

    public static Bean1 getBean() {
        return beanWithoutParam;
    }

    public static Bean1 getBean(String parameter) {
        System.out.println("静态工厂使用参数:" + parameter + ",初始化bean1");
        beanSetParam.setParameter(parameter);
        return beanSetParam;
    }

}
